.class Lcom/estrongs/android/util/p$a;
.super Ljava/lang/Object;
.source "ESThreadPoolImpl.java"

# interfaces
.implements Ljava/lang/Runnable;


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/estrongs/android/util/p;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "a"
.end annotation


# instance fields
.field private a:Z

.field final synthetic b:Lcom/estrongs/android/util/p;


# direct methods
.method constructor <init>(Lcom/estrongs/android/util/p;Z)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/estrongs/android/util/p$a;->b:Lcom/estrongs/android/util/p;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    .line 2
    iput-boolean p2, p0, Lcom/estrongs/android/util/p$a;->a:Z

    return-void
.end method


# virtual methods
.method public run()V
    .locals 4

    .line 1
    :catch_0
    :goto_0
    :try_start_0
    iget-object v0, p0, Lcom/estrongs/android/util/p$a;->b:Lcom/estrongs/android/util/p;

    invoke-static {v0}, Lcom/estrongs/android/util/p;->a(Lcom/estrongs/android/util/p;)Ljava/util/concurrent/atomic/AtomicInteger;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/concurrent/atomic/AtomicInteger;->incrementAndGet()I

    .line 2
    iget-object v0, p0, Lcom/estrongs/android/util/p$a;->b:Lcom/estrongs/android/util/p;

    invoke-static {v0}, Lcom/estrongs/android/util/p;->c(Lcom/estrongs/android/util/p;)Ljava/util/concurrent/BlockingQueue;

    move-result-object v0

    iget-object v1, p0, Lcom/estrongs/android/util/p$a;->b:Lcom/estrongs/android/util/p;

    invoke-static {v1}, Lcom/estrongs/android/util/p;->b(Lcom/estrongs/android/util/p;)J

    move-result-wide v1

    sget-object v3, Ljava/util/concurrent/TimeUnit;->SECONDS:Ljava/util/concurrent/TimeUnit;

    invoke-interface {v0, v1, v2, v3}, Ljava/util/concurrent/BlockingQueue;->poll(JLjava/util/concurrent/TimeUnit;)Ljava/lang/Object;

    move-result-object v0

    check-cast v0, Ljava/lang/Runnable;

    .line 3
    iget-object v1, p0, Lcom/estrongs/android/util/p$a;->b:Lcom/estrongs/android/util/p;

    invoke-static {v1}, Lcom/estrongs/android/util/p;->a(Lcom/estrongs/android/util/p;)Ljava/util/concurrent/atomic/AtomicInteger;

    move-result-object v1

    invoke-virtual {v1}, Ljava/util/concurrent/atomic/AtomicInteger;->decrementAndGet()I

    if-nez v0, :cond_2

    .line 4
    iget-boolean v0, p0, Lcom/estrongs/android/util/p$a;->a:Z

    if-eqz v0, :cond_0

    goto :goto_0

    .line 5
    :cond_0
    iget-object v0, p0, Lcom/estrongs/android/util/p$a;->b:Lcom/estrongs/android/util/p;

    invoke-static {v0}, Lcom/estrongs/android/util/p;->d(Lcom/estrongs/android/util/p;)Ljava/util/concurrent/locks/ReentrantLock;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantLock;->lock()V
    :try_end_0
    .catch Ljava/lang/InterruptedException; {:try_start_0 .. :try_end_0} :catch_0

    .line 6
    :try_start_1
    iget-object v0, p0, Lcom/estrongs/android/util/p$a;->b:Lcom/estrongs/android/util/p;

    invoke-static {v0}, Lcom/estrongs/android/util/p;->e(Lcom/estrongs/android/util/p;)I

    move-result v0

    iget-object v1, p0, Lcom/estrongs/android/util/p$a;->b:Lcom/estrongs/android/util/p;

    invoke-static {v1}, Lcom/estrongs/android/util/p;->g(Lcom/estrongs/android/util/p;)I

    move-result v1

    if-le v0, v1, :cond_1

    .line 7
    iget-object v0, p0, Lcom/estrongs/android/util/p$a;->b:Lcom/estrongs/android/util/p;

    invoke-static {v0}, Lcom/estrongs/android/util/p;->f(Lcom/estrongs/android/util/p;)I
    :try_end_1
    .catchall {:try_start_1 .. :try_end_1} :catchall_0

    .line 8
    :try_start_2
    iget-object v0, p0, Lcom/estrongs/android/util/p$a;->b:Lcom/estrongs/android/util/p;

    invoke-static {v0}, Lcom/estrongs/android/util/p;->d(Lcom/estrongs/android/util/p;)Ljava/util/concurrent/locks/ReentrantLock;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantLock;->unlock()V

    return-void

    :cond_1
    iget-object v0, p0, Lcom/estrongs/android/util/p$a;->b:Lcom/estrongs/android/util/p;

    invoke-static {v0}, Lcom/estrongs/android/util/p;->d(Lcom/estrongs/android/util/p;)Ljava/util/concurrent/locks/ReentrantLock;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/concurrent/locks/ReentrantLock;->unlock()V

    goto :goto_0

    :catchall_0
    move-exception v0

    iget-object v1, p0, Lcom/estrongs/android/util/p$a;->b:Lcom/estrongs/android/util/p;

    invoke-static {v1}, Lcom/estrongs/android/util/p;->d(Lcom/estrongs/android/util/p;)Ljava/util/concurrent/locks/ReentrantLock;

    move-result-object v1

    invoke-virtual {v1}, Ljava/util/concurrent/locks/ReentrantLock;->unlock()V

    .line 9
    throw v0

    .line 10
    :cond_2
    invoke-interface {v0}, Ljava/lang/Runnable;->run()V
    :try_end_2
    .catch Ljava/lang/InterruptedException; {:try_start_2 .. :try_end_2} :catch_0

    goto :goto_0
.end method
